package cn.hchaojie.spring.day01;

public class PostService {
	private PostDao dao;
	
	// spring注入（inject）dao到service里面去
	// 提供一个setter方法，让spring注入依赖的对象
	public void setDao(PostDao dao) {
		this.dao = dao;
	}
	
	public PostService() {
		System.out.println("PostService 初始化。。。");
	}
	
	public void delete() {
		System.out.println("service删除。。。");
		dao.delete();
	}
}
